import request from '@/utils/request'
export const reqspuimg = (spuId)=>request({
    url:`/admin/product/spuImageList/${spuId}`,
    method:"get"
})
export const reqspusaleattrlist = (spuId)=>request({
    url:`/admin/product/spuSaleAttrList/${spuId}`,
    method:"get"
})
export const reqarreinforlist = (oobj)=>request({
    url:`/admin/product/attrInfoList/${oobj.category1Id}/
    ${oobj.category2Id}/${oobj.category3Id}`,
    method:"get"
})
// 增加商品sku的保存
export const saveSkuInfo = (datalist)=>request({
    url:`/admin/product/saveSkuInfo`,
    data:datalist,
    method:"post"
})
//查看sku实例的列表:
export const seeskuinfo = (spuId)=>request({
    url:`/admin/product/findBySpuId/${spuId}`,
    method:"get"
})

export const getskudatalist = (page,limit)=>request({
    url:`/admin/product/list/${page}/${limit}`,
    method:"get"
})
//上架接口
export const onsaveisshop = (skuId)=>request({
    url:`/admin/product/onSale/${skuId}`,
    method:"get"
})
//下架接口:
export const downsaveisshop = (skuId)=>request({
    url:`/admin/product/cancelSale/${skuId}`,
    method:"get"
})
//抽屉数据展示接口getshowshopdetail
export const getshowshopdetail = (skuId)=>request({
    url:`/admin/product/getSkuById/${skuId}`,
    method:"get"
})